package com.pattern.once.mediator;

/***
 * 库存管理
 */
public class Stock extends AbstractColleague {
    public Stock(AbstractMediator mediator) {
        super(mediator);
    }

    private static int computer_number = 100;

    public void increase (int number){
        computer_number = computer_number +number;
        System.out.println("库存数量为"+computer_number);
    }

    public void decrease (int number){
        computer_number = computer_number +number;
        System.out.println("库存数量为"+computer_number);
    }
    public int getStockNumber (){
        return computer_number;
    }

    public void clearDtock(){
        System.out.println("清理库存数量");
        super.mediator.execute("stock.clear");
    }


}
